#!/usr/bin/python

def mergeSort(alist):
	print("Splitting ",alist)
	if len(alist) > 1:
		mid = len(alist)//2
		lefthalf = alist[:mid]
		righthalf = alist[mid:]
		mergeSort(lefthalf)
		mergeSort(righthalf)

		i=0
		j=0
		k=0
		while i<len(lefthalf) and j<len(righthalf):

list = [3,6,9,5,4,2,7,1,8]
mergeSort(list)
